<!DOCTYPE html>
<html>
	<head>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<meta name="format-detection" content="telephone=no" />
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<title>备忘录内容</title>
	</head>
	<style type="text/css">
		body{
			margin: 0;
		}
		p{
			margin: 0;
			padding: 0;
			text-indent:2em;
			font-size: 16px;
		}
		.remover{
			position:absolute;
			bottom: 20px;
			left:35%;
			background:#fff;
			height: 25px;
			width: 100px;
			text-align: center;
			color: red;
			border-radius: 5px;
			outline: none;
			border: 1px solid #f60;
		}
	</style>
	<body>
		<p class="con">
			
		</p>
		<button class="remover">删除</button>
		<script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.js" type="text/javascript" charset="utf-8"></script>
		<script src="http://www.joyue-tech.com/szptApp/html/js/common/common.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			
			 function getUrlParam(name) {
		            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
		            var r = window.location.search.substr(1).match(reg);  //匹配目标参数
		            if (r != null) return unescape(r[2]); return null; //返回参数值
		        }
			var id = getUrlParam('Id');
//			var Content = getUrlParam('content');
			function Http(id){
				var url = server_url + "a/zhtj/memo/getmemo"
				$.ajax({
					type:"get",
					url:url,
					async:true,
					json:"callback",
					data:{
						id:id
					},
					dataType:"json",
					success:function(res){
						console.log(res);
						console.log(res.data);
						if(res.status == 0){
							var Content = res.data[0].content;
							console.log(Content);
							$('.con').text(Content);
						}
					}
				})
			}
			Http(id);
			function reMove(id){
				var url= server_url + "a/zhtj/memo/deletememo"
				$.ajax({
				type:"get",
				url:url,
				async:true,
				json:"callback",
				data:{
				     id:id
					},
				dataType:'json',
				success:function(res){
					console.log(res)
					if(res.status == 0){
						console.log("删除成功");
						location.href = "remark.html";
						}
					}
				});
			}
			$('.remover').click(function(){
				reMove(id);
				console.log("删除成功！");
			})
		</script>
	</body>
</html>
